﻿<!--- ==================================================
NAME:	add_messages.cfm
DESC:	This is the file that adds a message.
=================================================== --->
<cfsetting enablecfoutputonly="yes">


<!--- default data --->
<cfparam name="arguments.array_parts" type="any" default="">


<!--- build xml statement --->
<cfscript>
cart = '';
if  (IsArray(arguments.array_parts) AND ArrayLen(arguments.array_parts) GT 0) {
	indexcnt = ArrayLen(arguments.array_parts) + 1;
	for ( i=1; i LT indexcnt; i=i+1) {
	cart = cart & '<line_item>
		<product>
			<product_code>#Trim(Ucase(arguments.array_parts[i].product))#</product_code>
		</product>
	</line_item>';
	}
}

xi_namespace='#trim(application.xi_namespace)#:MATERIAL:GetStockStatus';
xi_interface='GetStockStatus_OB';
xml = '<xtiinput>
	<inputheader>
		<actionset>
			<action>stock_status</action>
		</actionset>
	</inputheader>
	<inputdata>
		<shopping_cart>
			#cart#
		</shopping_cart>
	</inputdata>
</xtiinput>';
</cfscript>